package cn.edu.scau.cmi.yewangjiang.simpleFactoryMethod;
import cn.edu.scau.cmi.yewangjiang.simpleFactoryMethod.domain.*;

public class MeatFactory {
    public static Meat getMeat(String meatTypeString) {
    	Meat meat=null;
    	String typeString=meatTypeString.toLowerCase();
    	switch(typeString) {
    	  case "beef":
    		  meat=new Beef();
    		  break;
    	  case "pork":
    		  meat=new Pork();
    		  break;
    	  case "chicken":
    		  meat=new Chicken();
    		  break;  
    	}
    	return meat;
    }
}
